package com.xmy.study.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 课程表
 * </p>
 *
 * @author hpiggy
 * @since 2023-09-08
 */
@Accessors(chain = true)
@TableName("edu_course")
@ApiModel(value = "Course对象", description = "课程表")
@Data
public class Course implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("分册")
    private String volume;

    @ApiModelProperty("描述")
    private String des;

    @ApiModelProperty("封面")
    private String coverImg;

    @ApiModelProperty("状态：1启用,0关闭，")
    private Integer status;

    private Integer sort;

    @ApiModelProperty("版本id")
    private Long courseVersionId;

    @TableField(exist = false)
    private String courseVersionName;

    @ApiModelProperty("学段id")
    private Long periodId;

    @TableField(exist = false)
    private String periodName;

    @ApiModelProperty("年级")
    private Integer yearClassId;

    @ApiModelProperty("年段：0幼儿园，1小学，2初中，3高中")
    private Integer gradeSection;

    @ApiModelProperty("年份")
    private Integer yearPart;

    @ApiModelProperty("季度（学期）")
    private Integer quarterNum;

    @ApiModelProperty("班型id")
    private Long classTypeId;

    @ApiModelProperty("总关数")
    @TableField(exist = false)
    private Integer allShutNum;

    @TableField(exist = false)
    private String classTypeName;
    @ApiModelProperty("添加时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    @ExcelIgnore
    @ApiModelProperty("是否删除，0正常，1删除")
    @TableLogic(value = "0", delval = "1")
    @TableField(select = false)
    private Integer deleted;

    @ApiModelProperty("创建人id")
    private Long createdId;
}
